package org.example.controller;
import org.example.bean.Users;
import org.example.service.UsersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@CrossOrigin
@RestController
@RequestMapping("users")
@ResponseBody
public class UsersController {

    @Autowired
    private UsersService usersService;

    @GetMapping("findAll.do")
    public List<Users> findAll(){
        return usersService.findAll();
    }
}
